<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.model' );
class EcommerceModelOverall extends JModel
{
	function __construct()
	{
		parent::__construct();
	}
	function getOrders()
	{
		$user = & JFactory::getUser();
		$query = "SELECT * FROM #__pr_orders WHERE order_user_id  = " . $user->id . " ORDER BY order_date DESC ";
		
		$this->_db->setQuery($query);	
		$orders = $this->_db->loadObjectList();
		return $orders;
	}
	
}
?>